package action;

import java.util.List;

import model.dao.DaoPronostico;
import model.dao.impl.DaoPronosticoImp;

import com.opensymphony.xwork2.ActionSupport;

import dto.config;



public class Usuario extends ActionSupport{
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2219577913869066085L;
		
	private String userlogin;
	private String userpassword;
	private String usernombre;	
	List<config> configlist;
	
	
	
	
	
	public String Validauser(){
		String ir=ERROR;
		if(getUserlogin().equals("admin")&&getUserpassword().equals("1234")){
			setUsernombre("Erik macedo cristobal");
			ir=SUCCESS;
		}
		DaoPronostico objcosa = new DaoPronosticoImp();
		setConfiglist(objcosa.config()); 
		
		return ir;						
	}
	
	public String getUserlogin() {
		return userlogin;
	}
	public void setUserlogin(String userlogin) {
		this.userlogin = userlogin;
	}
	public String getUserpassword() {
		return userpassword;
	}
	public void setUserpassword(String userpassword) {
		this.userpassword = userpassword;
	}
	public String getUsernombre() {
		return usernombre;
	}
	public void setUsernombre(String usernombre) {
		this.usernombre = usernombre;
	}

	public List<config> getConfiglist() {
		return configlist;
	}

	public void setConfiglist(List<config> configlist) {
		this.configlist = configlist;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}
